{layout name="layout" /}

<div class="row">
    <div class="col-xs-12">
        <div class="nav-tabs-custom">
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">管理员用户列表</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table id="staff" class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>用户名</th>
                            <th>邮箱</th>
                            <th>最后登录时间</th>
                            <th>最后登录IP</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                            {volist name="list" id="vo"}
                                <tr>
                                    <td>{$vo.user_id}</td>
                                    <td>{$vo.user_name}</td>
                                    <td>{$vo.email}</td>
                                    <td>{$vo.last_login_time}</td>
                                    <td>{$vo.last_login_ip}</td>
                                    <td>{if condition="$vo['status']=='1'"}
                                    <span class="label label-success {if condition="$vo['user_id'] != '1'"}status{/if}" data-href="{:url('change_status','uid='.$vo['user_id'])}" data-status="1" data-id="{$vo.user_id}">启用</span>
                                    {else /}
                                    <span class="label label-danger status" data-href="{:url('change_status','uid='.$vo['user_id'])}" data-status="0" data-id="{$vo.user_id}">停用</span>
                                    {/if}
                                    </td> 
                                    <td>{if condition="$vo['user_id'] == '1'"}<i class="fa fa-pencil control gray"></i>&nbsp;<i class="fa fa-trash-o red control gray" ></i>{else / }<a href="{:url('edit', 'uid='.$vo['user_id'])}"><i class="fa fa-pencil control"></i></a>&nbsp;<i class="fa fa-trash-o red control confirm-rst-url-btn" data-url="<?php echo url('del','uid='.$vo['user_id']);?>" data-info="您确定要删除当前用户吗？" title="删除"></i>{/if}</td>
                                </tr>
                            {/volist}
                        </tbody>
                        <!-- tbody是必须的 -->
                    </table>
                </div>
                {$list->render()}
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->
    </section>
    <!-- /.content -->
    {include file="public/base" /} {include file="public/edit" /} {include file="public/footer" /}
    </body>
</html>